package com.ssy.lingxi.purchase.repository.needplan;

import com.ssy.lingxi.purchase.entity.needplan.NeedPlanInnerRecord;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 需求计划内部记录DB操作类
 * */
@Repository
public interface NeedPlanRecordRepository extends JpaRepository<NeedPlanInnerRecord, Long>, JpaSpecificationExecutor<NeedPlanInnerRecord> {

    List<NeedPlanInnerRecord> findByNeedPlanId(Long id, Sort sort);

    void deleteByNeedPlanId(Long id);

    Boolean existsByNeedPlanId(Long id);
}
